package com.fesine.learn.design.pattern.creational.singleton;

/**
 * @description: 类描述
 * @author: fesine
 * @createTime:2019/2/20
 * @update:修改内容
 * @author: fesine
 * @updateTime:2019/2/20
 */
public class T implements Runnable {
    @Override
    public void run() {
        //LazySingleton instance = LazySingleton.getInstance();
        //LazyDoubleCheckSingleton instance = LazyDoubleCheckSingleton.getInstance();
        //StaticInnerClassSingleton instance = StaticInnerClassSingleton.getInstance();
        //HungrySingleton instance = HungrySingleton.getInstance();
        ContainerSingleton.pubInstance("object",new Object());
        Object instance = ContainerSingleton.getInstance("object");
        System.out.println(Thread.currentThread().getName() + " " + instance);
    }
}
